package com.sise.bl.adapter;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.sise.bl.entity.Type;

public class TypeAdapter implements JsonSerializer<Type> {

    @Override
    public JsonElement serialize(Type type, java.lang.reflect.Type type2, JsonSerializationContext jsonSerializationContext) {
        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("tid", type.getTid());
        jsonObject.addProperty("tname", type.getTname());
        jsonObject.addProperty("tinfo", type.getTinfo());
        return jsonObject;
    }
}